package cn.mengfly.fxtest.app;


import javafx.application.Application;
import javafx.scene.Scene;
import javafx.scene.control.Button;
import javafx.scene.layout.StackPane;
import javafx.scene.paint.Color;
import javafx.scene.shape.Circle;
import javafx.scene.shape.Rectangle;
import javafx.stage.Stage;

/**
 * @author Mengfly
 * @date 2021/5/28 15:54
 */
public class StackPaneApp extends Application {



    @Override
    public void start(Stage primaryStage) {
        StackPane stackPane = new StackPane(
                new Rectangle(200, 100, Color.BLACK),
                new Circle(40, Color.RED),
                new Button("Hello StackPane")
        );
        primaryStage.setScene(new Scene(stackPane, 300, 300));
        primaryStage.setTitle("StackPaneApp");
        primaryStage.show();
    }
}
